﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MutilFileUpload.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Attach.MutilFileUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link rel="stylesheet" type="text/css" href="../../Styles/control.css" />
    <script language="javascript" type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/control.js"></script>
    <script language="javascript" type="text/javascript" src="../../Uploadify/js/jquery.min.js"></script>
    <link rel="Stylesheet" href="../../Uploadify/js/uploadify.css" />
    <script language="javascript" type="text/javascript" src="../../Uploadify/js/swfobject.js"></script> 
    <script language="javascript" type="text/javascript" src="../../Uploadify/js/jquery.uploadify.min.js"></script>
    <script type="text/javascript">
        var isUpload=false;
        $(document).ready(function () {
            $("#uploadify").uploadify({
                'uploader': '../../Uploadify/js/uploadify.swf',
                'script': 'Json/MutilUploadDocument.ashx',
                'cancelImg': '../../Uploadify/js/cancel.png',
                'folder': '',
                'wmode': 'transparent',
                'queueID': 'fileQueue',
                'auto': true,
                'multi': true,
                'width': 70,
                'height': 20,
                'buttonImg': '../../Uploadify/images/addAtt3.png',
                'onComplete': function (event, queueID, fileObj, response, data) {
                    if (!isUpload) {
                        $("#info").text("");
                        isUpload = true;
                    }
                    if (response != "1") {
                        $("#info").html($("#info").html() + "<li><span style='color:red'>*文件上传失败。" + response + "</span></li>");
                    }
                    else {
                        $("#info").html($("#info").html() + "<li>文件上传成功[" + fileObj.name + "]</li>");
                    }
                },
                'onAllComplete': function (event, data) {

                },
                'onSelect': function (e, queueId, fileObj) {
                }
            });
        });
</script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="file" name="uploadify" id="uploadify" />
    </div>
    <div class="infoContainer">注意：<br/>1、可一次选择多个文件<br/>2、只能选择合同相关文件<br/>3、文件名必须按照“项目编号-合同编号-申请次序”的规则，如"2-C001-V001"<br/>4、上传后文件将自动归类到对应的项目下的合同</div>
    <div class="infoContainer" id="info" style="margin-top:2px">
    当前没有上传文档（上传后将显示各文件上传结果）
    </div>
    <div id="fileQueue"></div>
    </form>
</body>
</html>
